home *** CD-ROM | disk | FTP | other *** search
/ Atari Mega Archive 1 / Atari Mega Archive - Volume 1.iso / mint / lib / mntlib44.zoo / mntlib / purec / INSTALL.BIN < prev    next >
Text File  |  1993-07-06  |  5KB  |  122 lines

  1. MiNT Library for Turbo C / Pure C
  2.  
  3. hohmuth 7 Mar 1993
  4.  
  5. This file describes the build and installation procedure of the MiNT 
  6. library for Turbo C and Pure C for the binary distribution.  (If you 
  7. have the source distribution, see the file INSTALL.SRC.  For notes on 
  8. how to use the library, refer to README.PC.)
  9.  
  10. This file is shipped with both the Pure C and the Turbo C binary 
  11. distributions.  If you have the distribution for Pure C, ignore 
  12. everything which refers to Turbo C, and vice versa.
  13.  
  14. --------------------------------------------------------------------------
  15.  
  16. Building the MiNT library from the binary distribution means linking the 
  17. distributed files with the math libraries from Pure's/Turbo's distribution 
  18. (which are not freely distributable).
  19.  
  20. The binary distribution consists of at least the following files:  
  21. makefile, tosify.mak, mintlib.lib, d_flt.lib, crt0.o and alloca.o.  The 
  22. Pure C distribution additionally contains d_881.lib and falloca.o.
  23.  
  24. There are several ways to build the math libraries:
  25.  
  26. (a) You could do it using Make and the supplied makefile, as described 
  27.     below.
  28.  
  29. (b) You could also issue the one or two nessecary commands by hand using 
  30.     your favourite shell; this is probably the easiest way:
  31.  
  32.     Pure C:     plink.ttp -J -G -O=mintflt.lib d_flt.lib pcfltlib.lib
  33.                 plink.ttp -J -G -O=mint881.lib d_881.lib pc881lib.lib
  34.  
  35.     Turbo C:    tlink.ttp -J -G -O=mintflt.lib d_flt.lib tcfltlib.lib
  36.  
  37. (c) You could write yourself a Pure/Turbo C Project file that links the 
  38.     parts together.
  39.  
  40. The rest of this file describes option (a) in more detail:
  41.  
  42. You need the following tools to build the library:
  43.  
  44. o   The compiler's tools (of course), in particular `pcc.ttp', `pasm.ttp' 
  45.     and `plink.ttp' (resp. for Turbo C: `tcc.ttp', `mas.ttp' and 
  46.     `tlink.ttp').
  47.  
  48. o   GNU Make, version 3.60 or better.  (The makefile needs GNU Make's 
  49.     functionality, so please don't try another Make.)
  50.  
  51. o   If you want to be able to do `make install' and such, you additionally 
  52.     need `cp'. (I recommend that from the GNU file utilities, linked with 
  53.     the MiNT library PL 25 or above; it will then understand file names 
  54.     like "/dev/a/foo" instead of "A:\foo".)
  55.  
  56. To build the MiNT library, the following steps are nessecary:
  57.  
  58. 1)  Edit the `makefile' to suit your taste.  You should only have to edit 
  59.     the configuration section at the beginning of the file.  Simply 
  60.     follow the instructions given as comments in the makefile.  (Comments 
  61.     are on lines starting with `#'.)
  62.     
  63.     Here is a list of Make variables which have to be configured, and 
  64.     their default:
  65.     
  66.     COMPILERDIR=    /dev/d/pc               # compiler's dir.
  67.     LIBDIR=         $(COMPILERDIR)/lib      # compiler's lib dir
  68.     COMPILERINCDIR= $(COMPILERDIR)/include  # compiler's include dir
  69.     INCLUDEDIR=     /dev/g/gnu/include      # MiNT lib's include dir
  70.     INSTALLDIR=     $(LIBDIR)               # where to install MiNT lib
  71.     TOSIFY_NAMES=   yes         # compiler's tools need old style file names
  72.     TOSIFY_COMMAND=             # undef'd means "shell groks Un*x file names"
  73.     sh_backslash=   \\          # bourne shell needs escaped backslashes
  74.     SHELL=          /bin/sh                 # I use a standard Bourne shell
  75.     RM=             rm                      # remove command
  76.     INSTALL_DATA=   cp                      # install command
  77.  
  78.     The other configurable Make variables should be left as they are; 
  79.     they are only needed when building the library from the source.  The 
  80.     Make variable TURBOC should only be defined if you use Turbo C.
  81.  
  82.     A somewhat difficult decision is which shell to use.  I use a standard 
  83.     bourne shell (from the BSD networking distribution); Bash (the GNU 
  84.     Bourne Again Shell), Mupfel 1.89 or better (which comes with Gemini) 
  85.     and `shell.ttp' (from the Elvis for MiNT distribution) also work.  
  86.     Mupfel 1.21 will _not_ work.  I haven't tried Gulam, but I presume it 
  87.     works too.  You could also try specifying no shell at all and have 
  88.     make executing your commands.
  89.     
  90.     Depending on your shell, you need to configure the Make variables 
  91.     SHELL, TOSIFY_COMMANDS and sh_backslash.  Here are the settings for 
  92.     the shells I tried:
  93.     
  94.     sh, bash        sh_backslash = \\
  95.     shell.ttp       sh_backslash = \$(nothing)
  96.     mupfel.ttp      sh_backslash = \$(nothing), TOSIFY_COMMANDS = yes
  97.  
  98. 2)  Copy the files math.h and float.h from your compiler's distribution 
  99.     to the MiNT library's include directory, renaming them to tcmath.h 
  100.     and tcfloat.h.
  101.  
  102.     The following command does this for you:
  103.     
  104.         make install-includes
  105.     
  106. 3)  You're ready to build the library now.  Hit
  107.  
  108.         make
  109.         
  110.     This builds the following files:  mintlib.lib (if it did not already 
  111.     exist) and mintflt.lib.  In the Pure C distribution, additionally the 
  112.     file mint881.lib will be built.
  113.     
  114. 4)  You are now ready to install the library (which consists of the 
  115.     following files:  mintlib.lib, mintflt.lib, crt0.o, alloca.o, and 
  116.     for Pure C additionally mint881.lib and falloca.o).  Do this by 
  117.     invoking
  118.  
  119.         make install
  120.  
  121.  
  122.